import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex); //vue的插件机制

export default new Vuex.Store({
	state: {
		music:{},
		progressText: '00:00',
		durationText: '00:00',
		progress: 0,
		duration: 0,
	},
	mutations: {
		setMusic(state,value){
			state.music=value
		},
		setPrT(a,b){
			a.progressText=b
		},
		setDuT(a,b){
			a.durationText=b
		},
		setPr(a,b){
			a.progress=b
		},
		setDu(a,b){
			a.duration=b
		}
	}
})
